{# use this template to generate a binary setting for instance config. Set a "slug" and "label" keys. Set also an array "src" so we can check current config. #}
{# optionally a "model" and "help" #}
{# "affix" can be used to avoid the same html id attribute #}
{% set model = model|default('config') %}
{% set src = src|default(App.Config.configArr) %}
{% set slugId = slug ~ (affix ? '-' ~ affix) %}
<div class='d-flex justify-content-between'>
  <label for='{{ slugId }}' class='col-form-label'>{{ label }}</label>
  <label class='switch ucp-align'>
    <input type='checkbox' autocomplete='off' data-trigger='change' data-model='{{ model|default('config') }}' data-target='{{ slug }}' {{ src[slug] ? 'checked="checked"' }} id='{{ slugId }}'>
    <span class='slider'></span>
  </label>
</div>
{% if help %}
  <p class='smallgray'>{{ help }}</p>
{% endif %}
<hr>
